package services

import (
	"familytree/dao"
	"familytree/models"
)

func Getpeople() (error, []models.Peoples) {
	peopleData, err := dao.Selectpeople()
	return err, peopleData
}

func Updatepeople(People models.Peoples) error {
	err := dao.Updatepeople(People)
	return err
}

func Addpeople(People models.Peoples) error {
	err := dao.Addpeople(People)
	return err
}

func Delpeople(id string) error {
	err := dao.Deletepeople(id)
	return err
}
